1. Field of the Invention
The present invention relates to an imaging apparatus that performs an error diffusion process on image data with M gray levels to reproduce an N-level dot image (M>N), the technology being suitable for application in printers, digital copiers, facsimile machines, and the like.
2. Related Art
The imaging quality of printers and the speed of personal computers have significantly improved over the past few years. Particularly, the output resolution of printers has reached a high of 1200×1200 dpi, and some printers are capable of changing the output dot size from a choice of small, medium, to large dots. Achieving a higher resolution in ink jet printers involves increasing the density of the ink heads that spray ink and improving the performance of paper conveyances, or preventing the sprayed ink from spreading on the paper by using ink with high viscosity, for example, and controlling the amount of ink coming out so that the dot size can be changed to obtain a mixture of small, medium, and large sized dots. Also, in electrophotographic printers, the resolution can be improved by increasing the density of the write spots to be irradiated on the photoconductor and reducing the size of the toner particles to be transferred onto the paper, and further, by controlling the amount of irradiation forming one dot through pulse width division of the write beam or by modulating the dot size through varying the intensity of the laser beam used in the above irradiation.
In the ink jet printer, the N-level dot image is reproduced using ink with varying degrees of concentration. Specifically, the ink is divided into light ink and dark ink (normally, the light ink is diluted to one third (⅓) to one sixth (⅙) of the concentration of the dark ink), and in the highlighted portions of the image, the light ink is used whereas in the medium to dark portions, the dark ink is used.
The multi-level gray scale representation according to the ink jet technique in which ink with varying degrees of concentration is used, and the multi-level gray scale representation according to the electrophotographic technique in which the dot size is modulated are both effective technologies for output apparatuses that quantize an image of M gray levels into an N-level dot image (2<N<M), and the above technologies can make a big contribution to improving image quality.
In reproducing an image, graininess is an important factor. The graininess of the highlighted portions of the image can be improved by increasing the density of the dots in the print-out and using ink of varying concentration or modulating the dot size. Normally, small dots unrecognizable by the human eye are evenly distributed.
In a printer that is unable to perform dot size modulation, dot area modulation is used to represent gradation by varying the area occupied by dots. In such a printer, medium density images can be output (or reproduced) with uniform dots with good graininess since the dots are unrecognizable and evenly output. The same applies to high-resolution printers. However, in a printer with low resolution, big dots are output for the highlighted portions of the image and the dots are spaced apart from each other, causing the isolated dots to stand out, and thereby degrading the graininess of the image. In a printer with high resolution, the dot size is smaller and more dots are output, so that the graininess of the highlighted portions will not be much of a problem.
In the dot size modulation technique, the brightness of the highlighted image is represented by numerous small dots so that a finer graininess can be obtained. Also, by using lighter ink (low concentration ink), the output dots will have a lighter shade and will be less recognizable, thereby further improving the graininess.
In general, when supplying image data of M gray levels to a printer capable of outputting an N-level dot image (M>N), a quantization process is performed to reduce the number of gray levels of each pixel. The quantization process may be performed using the error diffusion technique or the minimized average error method, both of which are superior in providing gradation (or change of tone) of graininess and sharpness in the image.
Error diffusion is a dithering or a digital halftoning process in which the quantization error generated during the quantization of a pixel is weighted and distributed to neighboring pixels not yet quantized so that the error can be diffused. The minimized average error minimization technique is another dithering or digital halftoning process in which the image data value of the target pixel is corrected based on the weighted average of the quantization error generated at the neighboring pixels already quantized. In both techniques, the quantization errors are conserved throughout the image; thus an image is reproduced with excellent graininess. The difference between the error diffusion technique and the minimized average error method is only in the timing of performing the error diffusion, and thus, in the following, both of these techniques will be referred to as the error diffusion technique.
FIG. 1 is a diagram illustrating the error diffusion process according to the conventional art. In this error diffusion process, an input (multi-level gray scale image data) 1 and an error value pre-calculated at an error diffusion matrix 7 are added by an adder 2, the calculated result being input to a quantization part 3. Further, the input value of the quantization part 3 and a quantization threshold value are compared so as to determine an output value 4. Then, the difference between the output value 4 and the value input to the quantization part 3 is calculated by a subtractor 5 and the above result is stored in an error memory 6 as the error value of the next target pixel. In performing the above process for the next pixel, the error value for the target pixel (*) is obtained in the error diffusion matrix 7 using the error values of four neighboring pixels, for example, and the obtained error value is then added to the input value 1 by the adder 2. By repeating the above process for each of the pixels, the brightness (gray level) of the image can be conserved in the error diffusion process.
FIG. 2 is a diagram showing the dot output distribution in a 4-level error diffusion process as an example of a multi-level error diffusion process. Given that the four levels of the quantization output values correspond to the input values 0 (dot off), 85 (small dot), 170 (medium dot), and 255 (large dot), the percentage of small dots increases as the density (gray level) increases until reaching 85, and when the input data level reaches 85 the percentage of the small dots becomes 100%. When the input data level is in between 85–170, the percentage of the small dots decreases while the percentage of the medium dots increases. When the input data level reaches 170, the percentage of the medium dots becomes 100%. When the input data level (gray level) is in between 170–225, the percentage of the medium dots decreases while the percentage of large dots increases, and at an input data level of 225, the percentage of the large dots becomes 100%.
Although the error diffusion technique is excellent in graininess (or change of tone) a visual gap is created at the switchover regions of the quantization output values (when the input value exactly corresponds to a quantization output value). This phenomenon will be explained using an example of converting 256 gray levels of image data (each pixel being represented by 8 bits) into 4-level quantized image using error diffusion in which M=256 and N=4, is given. Herein, the 4-level quantization output values from the error diffusion process are denoted as O1 (dot off or blank hole), O2 (small dot), O3 (medium dot), and O4 (large dot), the gray scale corresponding to each of the 4-level quantization output values being 0, 85, 170, and 255, respectively, and the threshold values being the median of each of the output values, namely, 43, 128, and 213. Also, O1 (dot off) represents white and O4 (255; total ink coverage or solid density) represents black in this example; however, this may be reversed.
When error diffusion is performed on a continuous tone image that changes from a gray value of 0 to 128, the gray scale is represented using O1 (dot off) and O2 (small dot) if the input value of the gray scale is below 85. When the input value of the gray scale is 85, it is represented by a 100% density of the output value O2 (small dot). When the input value of the gray scale is above 86, the gray scale is represented by a mixture of output values O2 (small dot) and O3 (medium dot).
FIG. 3 is a diagram showing a result of performing a simple 4-level error diffusion process on a continuous tone image in which the gray value changes from 0 to 128. As shown in FIG. 3, depending on the change rate in the tone gradation and the processing direction, there may be a delay in the output of the output value O3 (medium dot) for the gray scale input value of 86 so that regions filled up with output values O2 (small dot) spread instead. Similarly, the above effect occurs when the error diffusion process is performed on a continuous tone image in which the gray value changes from 128 to 0. Herein, at the gray scale input value of 84, there may be a delay in the output of the output value O1 (dot off) so that regions filled up with output values O2 (small dot) spread instead.
When the quantized output value of the N-level error diffusion and the input value are equivalent, namely, when the input values are 0, 85, 170, and 255 in the above example, the gray scale is represented by filling up the relevant region with O1 (dot off), O2 (small dot), O3 (medium dot), and O4 (large dot), respectively. In these regions, the output values do not mix with other output values; therefore, the frequency characteristics of the image are uniform and a fine graininess can be achieved. On the other hand, in the other regions, the gray scale is represented by a combination of N-level quantized output values, thus in these regions, two output values intermingle and the frequency characteristics of the image will be uneven. That is, in a continuous tone image in which the gray scale changes from 0 to 128, the region in which the gray scale value of the input is 85 has a finer graininess than the rest of the regions, thereby creating an awkwardness in this region.
Similarly, fine graininess is also obtained from input gray scale values of 0 and 255; however, this is different for cases in which the input gray scale values are 85 or 170. In the continuous tone image in which input gray values change from 0–128, the graininess around the gray scale value of 85 changes in the following manner:random dot image→uniform dot image→random dot imageIn the above case, the uniform dot image is situated in between randomly dotted images with the error diffused tones, which makes the difference easily recognizable.
On the other hand, the change in graininess around the gray scale value of 0 will be as follows:uniform dot image→random dot imageThis change is less recognizable. That is, in the regions around the whitened portions (gray scale value 0) and the totally darkened portions (gray scale value 255), awkwardness is less likely to be perceived due to the visual preconceptions of the human eye. In the region close to the gray scale value 0 (gray scale value 1) awkwardness arising from graininess is not really a problem; instead, the problem lies in the delay of the dots being produced in the error diffusion process which results in an increase in the whitened portion.
As previously mentioned, the regions corresponding to the gray scale values 85 and 86 are filled up by the output values O2 (small dot) as shown in FIG. 3. In reality, the region corresponding to the gray scale value 86 should be output primarily with the output value O2 (small dot), along with a small fraction of the output value O3 (medium dot) so as to represent a change in the brightness. However, in the image of FIG. 3, the output value O3 (medium dot) is not output in this region. Due to the delay in the generation of dots at the switchover regions of the 4-level quantization output values, a gray scale gap (contour) is created at the switchover regions, thereby degrading the image quality. Similarly, a gray scale gap (contour) is created at the switchover regions of the gray scale value 170 as well.
Generally, in the N-level error diffusion technique, there will be N−2 regions where awkwardness arises due to exceptionally fine graininess, that is, the regions where the input gray scale exactly corresponds to the output values excluding the whitened portion and the totally darkened portion. The gaps (contours) in the gray scale representation created in these regions (the switchover regions of the N-level quantization output value) are the causes of the image quality degradation.
In the conventional art, there have been a number of technologies developed in response to the above-described problems caused by the delay in dot generation. For example, in Japanese Laid-Open Patent Publication (JPA) No. 7-111591, an image processing apparatus in which the delay in dot generation in highlighted portions of the image and the delay in the dotless blank hole generation in the darkened portions are eliminated in a bi-level error diffusion by varying the threshold values depending on the brightness (density) is proposed. Also, in Japanese Laid-Open Patent Publication (JPA) No. 10-257302, a technology for eliminating the delay in dot generation upon performing a multi-level error diffusion process so as to improve the sharpness of the image is proposed.
The above-mentioned conventional art techniques solve the problem of distortions of the image due to the delay in dot generation; however, the image quality degradation caused by the delay in dot generation at the switchover regions of the N-level quantization output values is not particularly taken into consideration.
Consequently, measures have been taken to make the gaps (contours) less recognizable by adding noise to the switchover regions of the quantization output values and generating medium dots and dot off holes in the respective regions.
FIG. 4 is a diagram showing a result from a 4-level error diffusion process in which a random value with oscillation of ±32 is added to the gray scale value 85.
However, in this method, more medium dots appear in the region corresponding to the gray scale value 85 than in the regions representing gray scale values 86 and 87, thereby reversing the original gray level order. Moreover, since random values are added, the positions of the medium dots and dot off holes generated will be in disarray, thereby degrading the graininess. Further, the above method is not suitable for high speed processing because random values are used.
Thus, prior to the present application, the inventors of the present invention have proposed an imaging apparatus that performs a multi-level error diffusion process in which the delay in dot generation around the quantization output values is eliminated, this invention being disclosed in Japanese Patent Application No. 2002-15863 (not yet laid open). In the error diffusion technique in which M gray scale values are quantized into N levels (M>N>2), the delay in dot generation at the switchover regions of the N-level quantization output values causes the degradation of the image quality. Thus, by dividing the M gray scale values into N−1 sections, and changing the threshold value in each section according to the input gray scale value of the target pixel, the problem concerning the delay in dot generation around the beginning and end of a section, namely, the switchover regions of the N-level quantization output values, is solved.
FIG. 5 is a diagram showing how the threshold value increases according to the input value. According to this drawing, the input values are divided into a plurality of sections, wherein the predetermined threshold value around the beginning of a section is lowered, the threshold value around the end of the section is raised, and the two points are connected by a straight line to obtain the threshold value of the section. In this example, the 4-level error diffusion is performed; therefore, the input values are divided into 3 sections, as shown in FIG. 5. In an error diffusion process of N levels, the regions in which the delay in dot generation occurs are the switchover regions of the quantization output values, and thus, the number of the above regions will be N−2. Therefore, the input value is divided into N−1 sections, and the threshold value of the beginning of a section is lowered so as to facilitate the dot generation and the threshold value of the end of the section is raised so that the dot generation is controlled.
Also, in a bi-level error diffusion process, the delay in dot generation around the highlighted portions and the delay in the dot off hole generation around the fully darkened portions can be eliminated by using a threshold value that increases according to the input value, as shown in FIG. 6.
However, with the threshold value that increases according to the input value as shown in FIG. 6, results from subjective evaluations have shown that the sharpness of the image is degraded due to the inability to accurately reproduce edge portions of the image. That is, with the threshold values being inclined as in FIG. 5 and FIG. 6, the accumulation of error values decreases around the transitional regions of the image so that the dot generation is thwarted, and in turn, the sharpness of the image is degraded.